1. Field of the Invention
This invention generally relates to a method and an apparatus for detecting image displacement, and more particularly, to a method and an apparatus for detecting displacement with sub-pixel accuracy.
2. Description of the Related Art
A conventional method for detecting sub-pixel displacement, e.g. Taiwan patent number I225622 entitled “A method for detecting sub-pixel motion for optic navigation device”, calculates the sub-pixel motion by the equations of approximately linear model of first order Taylor Expansion. The method includes the steps of: capturing a first and a second images at different time; choosing a plurality of pixels in the first image as reference pixels; calculating the partial derivatives of the reference pixels using the approximately linear model of first order Taylor Expansion from the two images and generating a plurality of first order equations; and calculating the sub-pixel motion according to the plurality of first order equations. However in practical operation, because the method for detecting displacement by using the equations of approximately linear model of first order Taylor Expansion leaves out higher order terms, errors may be introduced during detection and the method is only suitable for the cases with small displacements. When the displacements become larger, errors contained in the detected displacements become more apparent. In addition, because the partial derivatives have higher sensitivity to noise, the detected results can be easily affected by pixel noise.
Another conventional method for calculating relative displacement, e.g. U.S. Pat. No. 5,729,008 entitled “Method and device for tracking relative movement by correlating signals from an array of photoelements” as shown in FIG. 1, captures a first frame 91 of 7×7 pixels by an scanning device and defines a searching block 93 of 5×5 pixels in the central area of the first frame 91. The image device captures a second frame 92 in which the searching block 93 is shifted toward different directions so as to obtain images 940-948. A relative movement can be calculated according to a correlation between the searching block 93 in the images 940-948 and the second frame 92. However in practical operation, since the smallest movement which can be obtained by this conventional method is a distance between two adjacent pixels of the image device, it is unable to determine a tiny movement when the tiny movement is smaller than the distance of one pixel width.
According to the above reasons, it is necessary to further improve the aforementioned conventional method and apparatus for detecting pixel motion so as to solve the problems existed in the art.